<h1>{{this.title}}</h1>

<DockerManager::ProgressBar @percent={{this.upgradeStore.progressPercentage}} />

{{#if this.complete}}
  <p>{{i18n "admin.docker.update_successful"}}</p>
{{else if this.failed}}
  <p>{{i18n "admin.docker.update_error"}}</p>
{{/if}}

{{#if this.isUpToDate}}
  {{#if this.multiUpgrade}}
    <p>{{i18n "admin.docker.everything_up_to_date"}}</p>
  {{else}}
    <p>{{i18n "admin.docker.repo_newest_version" name=this.model.name}}</p>
  {{/if}}
{{else}}
  <div class="upgrade-actions">
    <button
      {{on "click" this.start}}
      disabled={{this.upgrading}}
      class="btn start-upgrade"
      type="button"
    >
      {{#if this.upgrading}}
        {{i18n "admin.docker.updating"}}
      {{else}}
        {{i18n "admin.docker.start_updating"}}
      {{/if}}
    </button>

    {{#if this.upgrading}}
      <button {{on "click" this.resetUpgrade}} class="btn unlock" type="button">
        {{i18n "admin.docker.reset_update"}}
      </button>
    {{/if}}
  </div>
{{/if}}

<DockerManager::Console
  @output={{this.upgradeStore.consoleOutput}}
  @followOutput={{true}}
/>